<template>
  <div>
    <!-- 头部 -->
    <data-search-header :innerMenu="innerMenu"/>
    <section :class="isAsideFold ? 'section_fold' : 'section_noFold'">
      <!-- 表格 -->
      <data-search-table :innerMenu="innerMenu" class="tableContent" :class="asideMenuStatus ? '' : 'tableContent_Fold'" />
      <!-- 抽屉 -->
      <data-search-drawer-content />
    </section>
    <!-- 弹窗 -->
    <!-- <cs-popup @closeBtnClick="closeBtnClick" v-show="isShowPopup" /> -->
    <!-- 数据详情 -->
    <!-- <data-search-detail /> -->
  </div>
</template>

<script>
import dataSearchHeader from './cpns/data_search_header.vue'
import dataSearchTable from './cpns/data_search_table.vue'
import dataSearchDrawerContent from './cpns/data_search_drawerContent.vue'
import { getCacheInnerMenu } from '@/utils/menu'
// import csPopup from '@/components/cs-popup/cs-popup.vue'
// import dataSearchDetail from './cpns/data_search_detail.vue'

export default {
  components: {
    dataSearchHeader,
    dataSearchTable,
    dataSearchDrawerContent
    // csPopup
    // dataSearchDetail
  },
  data() {
    return {
      asideMenuStatus: false,
      isAsideFold: true
      // isShowPopup: false
    }
  },
  created() {
    // 监听后台菜单折叠状态
    this.$bus.$on('asideFoldeBtnClick', (status) => {
      this.asideMenuStatus = status
    })
    this.$bus.$on('dataSearchDrawerId', (status) => {
      this.isAsideFold = false
    })
    this.$bus.$on('drawerBoxStatusChange_dataSearch', (status) => {
      this.isAsideFold = true
    })
    this.innerMenu = getCacheInnerMenu(this.$route.meta.id)
    // console.log('站点管理权限', this.innerMenu)
  },
  methods: {
    // closeBtnClick() {
    //   this.isShowPopup = false
    // }
  }
}
</script>

<style scoped>
section {
  position: relative;
  display: flex;
  /* overflow: hidden; */
}

.section_noFold {
  overflow: visible;
}

.section_fold {
  overflow: hidden;
}

.tableContent {
  /* width: calc(100% + 60px);
  width: 1398px; */
  width: 100%;
}

.tableContent_Fold {
  /* width: 1228px; */
  width: 100%;
}
</style>
